package c.e.a.b.b;

public class b {
    public static final int a = 12451000;
    public static final b b = new b();

    static {
        boolean z = e.a;
    }

    /* JADX WARNING: Removed duplicated region for block: B:95:0x0186  */
    /* JADX WARNING: Removed duplicated region for block: B:113:? A:{SYNTHETIC, RETURN} */
    /* JADX WARNING: Removed duplicated region for block: B:109:0x01bf  */
    /* JADX WARNING: Removed duplicated region for block: B:52:0x00e8  */
    /* JADX WARNING: Removed duplicated region for block: B:51:0x00e6  */
    /* JADX WARNING: Removed duplicated region for block: B:55:0x00f3 A:{SYNTHETIC, Splitter:B:55:0x00f3} */
    /* JADX WARNING: Removed duplicated region for block: B:65:0x0117  */
    /* JADX WARNING: Removed duplicated region for block: B:64:0x0111  */
    /* JADX WARNING: Removed duplicated region for block: B:95:0x0186  */
    /* JADX WARNING: Removed duplicated region for block: B:109:0x01bf  */
    /* JADX WARNING: Removed duplicated region for block: B:113:? A:{SYNTHETIC, RETURN} */
    /* JADX WARNING: Removed duplicated region for block: B:37:0x00b3  */
    /* JADX WARNING: Removed duplicated region for block: B:51:0x00e6  */
    /* JADX WARNING: Removed duplicated region for block: B:52:0x00e8  */
    /* JADX WARNING: Removed duplicated region for block: B:55:0x00f3 A:{SYNTHETIC, Splitter:B:55:0x00f3} */
    /* JADX WARNING: Removed duplicated region for block: B:64:0x0111  */
    /* JADX WARNING: Removed duplicated region for block: B:65:0x0117  */
    /* JADX WARNING: Removed duplicated region for block: B:95:0x0186  */
    /* JADX WARNING: Removed duplicated region for block: B:113:? A:{SYNTHETIC, RETURN} */
    /* JADX WARNING: Removed duplicated region for block: B:109:0x01bf  */
    /* JADX WARNING: Removed duplicated region for block: B:95:0x0186  */
    /* JADX WARNING: Removed duplicated region for block: B:109:0x01bf  */
    /* JADX WARNING: Removed duplicated region for block: B:113:? A:{SYNTHETIC, RETURN} */
    /* JADX WARNING: No exception handlers in catch block: Catch:{  } */
    /* JADX WARNING: Missing block: B:33:0x00ac, code skipped:
            if (c.e.a.b.b.j.d.c() == false) goto L_0x00ae;
     */
    public int a(android.content.Context r11, int r12) {
        /*
        r10 = this;
        r0 = c.e.a.b.b.e.a;
        r0 = "GooglePlayServicesUtil";
        r1 = r11.getResources();	 Catch:{ all -> 0x000f }
        r2 = 2131689759; // 0x7f0f011f float:1.9008542E38 double:1.0531946775E-314;
        r1.getString(r2);	 Catch:{ all -> 0x000f }
        goto L_0x0014;
    L_0x000f:
        r1 = "The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.";
        android.util.Log.e(r0, r1);
    L_0x0014:
        r1 = r11.getPackageName();
        r2 = "com.google.android.gms";
        r1 = r2.equals(r1);
        r3 = " but found ";
        if (r1 != 0) goto L_0x0063;
    L_0x0022:
        r1 = c.e.a.b.b.e.c;
        r1 = r1.get();
        if (r1 != 0) goto L_0x0063;
    L_0x002a:
        c.e.a.b.b.h.u.a(r11);
        r1 = c.e.a.b.b.h.u.d;
        if (r1 == 0) goto L_0x005b;
    L_0x0031:
        r4 = 12451000; // 0xbdfcb8 float:1.7447567E-38 double:6.1516114E-317;
        if (r1 != r4) goto L_0x0037;
    L_0x0036:
        goto L_0x0063;
    L_0x0037:
        r11 = new java.lang.IllegalStateException;
        r12 = 320; // 0x140 float:4.48E-43 double:1.58E-321;
        r0 = new java.lang.StringBuilder;
        r0.<init>(r12);
        r12 = "The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected ";
        r0.append(r12);
        r0.append(r4);
        r0.append(r3);
        r0.append(r1);
        r12 = ".  You must have the following declaration within the <application> element:     <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />";
        r0.append(r12);
        r12 = r0.toString();
        r11.<init>(r12);
        throw r11;
    L_0x005b:
        r11 = new java.lang.IllegalStateException;
        r12 = "A required meta-data tag in your app's AndroidManifest.xml does not exist.  You must have the following declaration within the <application> element:     <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />";
        r11.<init>(r12);
        throw r11;
    L_0x0063:
        r1 = c.e.a.b.b.j.d.a;
        if (r1 != 0) goto L_0x0077;
    L_0x0067:
        r1 = r11.getPackageManager();
        r4 = "android.hardware.type.watch";
        r1 = r1.hasSystemFeature(r4);
        r1 = java.lang.Boolean.valueOf(r1);
        c.e.a.b.b.j.d.a = r1;
    L_0x0077:
        r1 = c.e.a.b.b.j.d.a;
        r1 = r1.booleanValue();
        r4 = 1;
        r5 = 0;
        if (r1 == 0) goto L_0x00b0;
    L_0x0081:
        r1 = android.os.Build.VERSION.SDK_INT;
        r6 = 24;
        if (r1 < r6) goto L_0x0089;
    L_0x0087:
        r1 = 1;
        goto L_0x008a;
    L_0x0089:
        r1 = 0;
    L_0x008a:
        if (r1 == 0) goto L_0x00ae;
    L_0x008c:
        r1 = c.e.a.b.b.j.d.b;
        if (r1 != 0) goto L_0x00a0;
    L_0x0090:
        r1 = r11.getPackageManager();
        r6 = "cn.google";
        r1 = r1.hasSystemFeature(r6);
        r1 = java.lang.Boolean.valueOf(r1);
        c.e.a.b.b.j.d.b = r1;
    L_0x00a0:
        r1 = c.e.a.b.b.j.d.b;
        r1 = r1.booleanValue();
        if (r1 == 0) goto L_0x00b0;
    L_0x00a8:
        r1 = c.e.a.b.b.j.d.c();
        if (r1 != 0) goto L_0x00b0;
    L_0x00ae:
        r1 = 1;
        goto L_0x00b1;
    L_0x00b0:
        r1 = 0;
    L_0x00b1:
        if (r1 != 0) goto L_0x00e3;
    L_0x00b3:
        r1 = c.e.a.b.b.j.d.c;
        if (r1 != 0) goto L_0x00d9;
    L_0x00b7:
        r1 = r11.getPackageManager();
        r6 = "android.hardware.type.iot";
        r1 = r1.hasSystemFeature(r6);
        if (r1 != 0) goto L_0x00d2;
    L_0x00c3:
        r1 = r11.getPackageManager();
        r6 = "android.hardware.type.embedded";
        r1 = r1.hasSystemFeature(r6);
        if (r1 == 0) goto L_0x00d0;
    L_0x00cf:
        goto L_0x00d2;
    L_0x00d0:
        r1 = 0;
        goto L_0x00d3;
    L_0x00d2:
        r1 = 1;
    L_0x00d3:
        r1 = java.lang.Boolean.valueOf(r1);
        c.e.a.b.b.j.d.c = r1;
    L_0x00d9:
        r1 = c.e.a.b.b.j.d.c;
        r1 = r1.booleanValue();
        if (r1 != 0) goto L_0x00e3;
    L_0x00e1:
        r1 = 1;
        goto L_0x00e4;
    L_0x00e3:
        r1 = 0;
    L_0x00e4:
        if (r12 < 0) goto L_0x00e8;
    L_0x00e6:
        r6 = 1;
        goto L_0x00e9;
    L_0x00e8:
        r6 = 0;
    L_0x00e9:
        b.i.b.f.J(r6);
        r6 = r11.getPackageManager();
        r7 = 0;
        if (r1 == 0) goto L_0x0102;
    L_0x00f3:
        r7 = "com.android.vending";
        r8 = 8256; // 0x2040 float:1.1569E-41 double:4.079E-320;
        r7 = r6.getPackageInfo(r7, r8);	 Catch:{ NameNotFoundException -> 0x00fc }
        goto L_0x0102;
    L_0x00fc:
        r12 = "Google Play Store is missing.";
        android.util.Log.w(r0, r12);
        goto L_0x0132;
    L_0x0102:
        r8 = 64;
        r8 = r6.getPackageInfo(r2, r8);	 Catch:{ NameNotFoundException -> 0x017b }
        c.e.a.b.b.f.a(r11);
        r9 = c.e.a.b.b.f.d(r8, r4);
        if (r9 != 0) goto L_0x0117;
    L_0x0111:
        r12 = "Google Play services signature invalid.";
        android.util.Log.w(r0, r12);
        goto L_0x0132;
    L_0x0117:
        if (r1 == 0) goto L_0x0135;
    L_0x0119:
        r1 = c.e.a.b.b.f.d(r7, r4);
        if (r1 == 0) goto L_0x012d;
    L_0x011f:
        r1 = r7.signatures;
        r1 = r1[r5];
        r7 = r8.signatures;
        r7 = r7[r5];
        r1 = r1.equals(r7);
        if (r1 != 0) goto L_0x0135;
    L_0x012d:
        r12 = "Google Play Store signature invalid.";
        android.util.Log.w(r0, r12);
    L_0x0132:
        r12 = 9;
        goto L_0x0181;
    L_0x0135:
        r1 = r8.versionCode;
        r7 = -1;
        if (r1 != r7) goto L_0x013c;
    L_0x013a:
        r9 = -1;
        goto L_0x013e;
    L_0x013c:
        r9 = r1 / 1000;
    L_0x013e:
        if (r12 != r7) goto L_0x0141;
    L_0x0140:
        goto L_0x0143;
    L_0x0141:
        r7 = r12 / 1000;
    L_0x0143:
        if (r9 >= r7) goto L_0x0163;
    L_0x0145:
        r6 = 77;
        r7 = new java.lang.StringBuilder;
        r7.<init>(r6);
        r6 = "Google Play services out of date.  Requires ";
        r7.append(r6);
        r7.append(r12);
        r7.append(r3);
        r7.append(r1);
        r12 = r7.toString();
        android.util.Log.w(r0, r12);
        r12 = 2;
        goto L_0x0181;
    L_0x0163:
        r12 = r8.applicationInfo;
        if (r12 != 0) goto L_0x0173;
    L_0x0167:
        r12 = r6.getApplicationInfo(r2, r5);	 Catch:{ NameNotFoundException -> 0x016c }
        goto L_0x0173;
    L_0x016c:
        r12 = move-exception;
        r1 = "Google Play services missing when getting application info.";
        android.util.Log.wtf(r0, r1, r12);
        goto L_0x0180;
    L_0x0173:
        r12 = r12.enabled;
        if (r12 != 0) goto L_0x0179;
    L_0x0177:
        r12 = 3;
        goto L_0x0181;
    L_0x0179:
        r12 = 0;
        goto L_0x0181;
    L_0x017b:
        r12 = "Google Play services is missing.";
        android.util.Log.w(r0, r12);
    L_0x0180:
        r12 = 1;
    L_0x0181:
        r0 = 18;
        if (r12 != r0) goto L_0x0186;
    L_0x0185:
        goto L_0x01bd;
    L_0x0186:
        if (r12 != r4) goto L_0x01bc;
    L_0x0188:
        r1 = r11.getPackageManager();	 Catch:{ Exception -> 0x01bc }
        r1 = r1.getPackageInstaller();	 Catch:{ Exception -> 0x01bc }
        r1 = r1.getAllSessions();	 Catch:{ Exception -> 0x01bc }
        r1 = r1.iterator();
    L_0x0198:
        r3 = r1.hasNext();
        if (r3 == 0) goto L_0x01af;
    L_0x019e:
        r3 = r1.next();
        r3 = (android.content.pm.PackageInstaller.SessionInfo) r3;
        r3 = r3.getAppPackageName();
        r3 = r2.equals(r3);
        if (r3 == 0) goto L_0x0198;
    L_0x01ae:
        goto L_0x01bd;
    L_0x01af:
        r11 = r11.getPackageManager();
        r1 = 8192; // 0x2000 float:1.14794E-41 double:4.0474E-320;
        r11 = r11.getApplicationInfo(r2, r1);	 Catch:{  }
        r4 = r11.enabled;	 Catch:{  }
        goto L_0x01bd;
    L_0x01bc:
        r4 = 0;
    L_0x01bd:
        if (r4 == 0) goto L_0x01c1;
    L_0x01bf:
        r12 = 18;
    L_0x01c1:
        return r12;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.e.a.b.b.b.a(android.content.Context, int):int");
    }
}
